
interface Router {
  basic: string;
  router: () => string;
  use: () => string;
}

interface ParamRouter {
  basic: string;
  param: string;
  router: () => string;
  use: (param: string) => string;
}

interface ChildrenRouter {
  parent: string;
  basic: string;
  router: () => string;
  use: () => string;
}

export const ROUTE_LOGIN: Router = {
  basic: 'login',
  router() {
    return `/${this.basic}`;
  },
  use() {
    return `/${this.basic}`;
  },
}

export const ROUTE_REGISTER: Router = {
  basic: 'register',
  router() {
    return `/${this.basic}`;
  },
  use() {
    return `/${this.basic}`;
  },
}

export const ROUTE_CONSOLE: Router = {
  basic: 'console',
  router() {
    return `/${this.basic}`;
  },
  use() {
    return `/${this.basic}`;
  },
}


export const ROUTE_CONSOLE_DASHBOARD: ChildrenRouter = {
  parent: ROUTE_CONSOLE.use(),
  basic: 'dashboard',
  router() {
    return this.basic;
  },
  use() {
    return `${this.parent}/${this.basic}`;
  },
}

export const ROUTE_CONSOLE_PROFILE: ChildrenRouter = {
  parent: ROUTE_CONSOLE.use(),
  basic: 'profile',
  router() {
    return this.basic;
  },
  use() {
    return `${this.parent}/${this.basic}`;
  },
}

export const ROUTE_CONSOLE_STOCKINFO: ChildrenRouter = {
  parent: ROUTE_CONSOLE.use(),
  basic: 'stockInfo',
  router() {
    return this.basic;
  },
  use() {
    return `${this.parent}/${this.basic}`;
  },
}


